﻿using System;
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace Kexp.ShoutcastRunner.Tests
{
	[TestClass]
	public class TestHelpers
	{
		[TestMethod]
		public void GetDatedFileName_ReturnsDatedFileName()
		{
			var datedFilename = Helpers.GetDatedFileName("test.xml", DateTime.Now);
			Console.WriteLine(datedFilename);

			datedFilename = Helpers.GetDatedFileName("test.xml", DateTime.Now, true);
			Console.WriteLine(datedFilename);

			datedFilename = Helpers.GetDatedFileName("test.xml", DateTime.Now, true, true);
			Console.WriteLine(datedFilename);

			datedFilename = Helpers.GetDatedFileName("test.xml", DateTime.Now, false, true);
			Console.WriteLine(datedFilename);
		}

		[TestMethod]
		public void GetAdjustedNowDate_DoesSomethingAtLeast()
		{
			Console.WriteLine(Helpers.GetAdjustedNowDate());
		}

		[TestMethod]
		public void GetMillisecondsUntilMidnight_DoesSomething()
		{
			int ms = Helpers.GetMillisecondsUntilMidnight();
			Console.WriteLine(ms);
			Console.WriteLine(Helpers.GetTimelineFromMilliseconds(ms));
		}

		[TestMethod]
		public void GetMillisecondsUntilNextMonth_DoesSomething()
		{
			long ms = Helpers.GetMillisecondsUntilDayOfMonth();
			Console.WriteLine(ms);
			Console.WriteLine(Helpers.GetTimelineFromMilliseconds(ms));
		}
	}
}
